//index.js
//获取应用实例
var app = getApp();
var height;
Page({
    data: {
       scroll_top: 0
    },
    goTopFun: function (e) {
        let that=this;
        let scroll_top = this.data.scroll_top;
        //  高度自适应
        wx.getSystemInfo({
        success: function (res) {
            height = 2181 - res.windowHeight*2;
        }
        });
        that.setData({
            scroll_top: height
        }); 
    } 
})
